package pl.prv.polanie.client.filemanager;

import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PopupPanel;

public class ThumbnailManager {
	
	private static PopupPanel popupPanel = null;
	
	public static void displayThumbnail(PopupPanel pp, int left, int top) {
		if (popupPanel != null) {
			popupPanel.hide();
		}
		
		popupPanel = pp;
		pp.setWidget(new Label("Loading image..."));
		pp.setPopupPosition(left, top);
		pp.show();
	}
	
	public static void hideThumbnail() {
		if (popupPanel != null) {
			popupPanel.hide();
		}
	}

}
